<template>
    <div class="Binding_success">
        <div class="head_title">
            <h2>您的账号已绑定成功</h2>
            <p>您现在可以享受公众号消息通知,小程序免登录等特权。</p>
        </div>
        <el-form ref="dynamicValidateForm" class="demo-dynamic">
            <el-form-item class="bot_btn">
                <el-button type="primary" @click="closeWindow">确定</el-button>
            </el-form-item>
        </el-form>
        <div id="show">
            <!-- 将倒计时<font color=red>"+this.time+"</font>秒后关闭当前窗口,返回微信公众号窗口 -->
        </div>
    </div>
</template>
<script>
export default {
    data(){
        return {
            time:5,
        }
    },
    methods:{
        closeWindow(){
            console.log('1221')
            //关闭微信页面
            // wx.closeWindow()
            // window.setTimeout('closeWindow()',2000);  
            // if(this.time>0){  
            //     document.getElementById("show").innerHTML=" 将倒计时<font color=red>"+this.time+"</font>秒后关闭当前窗口,返回微信公众号窗口";  
            //     this.time--;  
            // }else{  
                WeixinJSBridge.call('closeWindow');
                //this.window.opener=null; //关闭窗口时不出现提示窗口  
                //window.close();  
            // }
            // window.close();
        }
    }
}
</script>
<style lang="scss" scoped>
    .Binding_success{
        position: relative;

        #show{
            // position: absolute;
            width: 80%;
            padding: 15px;
            // top: 20%;
            line-height: 18px;
            margin: 0 auto;
            color: #999;
            text-align: center;
        }
        .el-form{
            width: 80%;
            .el-form-item.bot_btn{
                .el-form-item__content{
                    margin-top: 20px;
                    .el-button{
                        width: 100%;
                    }
                    .el-button--primary{
                        background-color: #4DBA9B;
                        border-color: #4DBA9B;
                    }
                    
                }
                
            }
        }
        .head_title{
            width: 80%;
            margin: 0 auto;
            padding-top: 50px;
            h2{
                color: #4DBA9B;
                margin-bottom: 15px;
            }
            p{
                color: #999;
                margin-bottom: 30px;
                line-height: 18px;
            }
        }
    }
</style>